#include "logindiaglog.h"
#include "ui_logindiaglog.h"
#include <QMessageBox>
#include <iostream>

LoginDiaglog::LoginDiaglog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::LoginDiaglog)
{
    ui->setupUi(this);
    connect(ui->LoginButton, SIGNAL(clicked()), this, SLOT(on_LoginButton_clicked()));
}

LoginDiaglog::~LoginDiaglog()
{
    delete ui;
}

void LoginDiaglog::on_LoginButton_clicked()
{
    std::cout << "click sucess" << std::endl;
    // this->hide();
    QMessageBox::warning(this, tr("警告！"),tr("用户名或密码错误！"),QMessageBox::Yes);
    // this->close();
    //MainWindow mawin;
    //mawin.show();

    //关闭窗体，并设置返回值为Accepted
    accept();
}
